import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    menus: [
      {
        title: "商品管理",
        id: 1,
        children: [
          { name: "商品列表", path: "/good" },
          { name: "商品分类", path: "/category" },
          { name: "品牌管理", path: "/brand" },
          { name: "商品属性管理", path: "/attribute" },
        ],
      },
      {
        title: "订单中心",
        id: 2,
        children: [{ name: "订单列表", path: "/order" }],
      },
      {
        title: "店铺运营",
        id: 3,
        children: [
          { name: "专题管理", path: "/topic" },
          { name: "运营数据", path: "/statdata" },
        ],
      },
    ],
  },
  mutations: {
    // ADDMENUS(state, payload) {
    //   state.menus = payload
    // }
  },
  getters: {
    getMenus(state) {
      return state.menus
    }
  },
  actions: {
  },
  modules: {
  }
})
